package mk.com.ldm.corepoint.administration.shared;

import java.util.ArrayList;

public class CurrentObject {

	private static CurrentObject currentObject;
	private String objectName;
	private ConfigurationObject config = new ConfigurationObject();
	private SimpleObject simple;
	private ArrayList<EventObject> events = new ArrayList<EventObject>();
	private Foreign foreign = new Foreign();
	private Boolean isSimple = new Boolean("false");
	private UserObject user = new UserObject();
	private ArrayList<PermissionsObject> permissions = new ArrayList<PermissionsObject>();
	
	public UserObject getUser() {
		return user;
	}


	public void setUser(UserObject user) {
		this.user = user;
	}


	public ArrayList<PermissionsObject> getPermissions() {
		return permissions;
	}


	public void setPermissions(PermissionsObject permissions) {
		this.permissions.add(permissions);
	}


	public static CurrentObject getInstance(){
		if(currentObject==null)
			currentObject = new CurrentObject();
		return currentObject;
	}

	
	public Boolean getIsSimple() {
		return isSimple;
	}

	public void setIsSimple(Boolean isSimple) {
		this.isSimple = isSimple;
	}

	public ConfigurationObject getConfig() {
		return config;
	}

	public void setConfig(ConfigurationObject config) {
		this.config = config;
	}

	public SimpleObject getSimple() {
		return simple;
	}

	public void setSimple(SimpleObject simple) {
		this.simple = simple;
	}

	public ArrayList<EventObject> getEvents() {
		return events;
	}

	public void setEvent(EventObject event) {
		this.events.add(event);
	}

	public String getObjectName() {
		return objectName;
	}

	public void setObjectName(String objectName) {
		this.objectName = objectName;
	}


	public Foreign getForeign() {
		return foreign;
	}


	public void setForeign(Foreign foreign) {
		this.foreign = foreign;
	}
	
	
	
	
}
